package object;

import java.awt.Color;
import java.util.ArrayList;

public class Point {
	private Color defaultColor = Color.WHITE;
	private Color currentColor = Color.BLACK;
	private double cost;
	public ArrayList<Point> neighbors = new ArrayList<Point>();
	private PointType type = null;
	public boolean flag = false;
	
	
	public final int x, y;
	public Point(int x, int y) {
		this.x = x;
		this.y = y;
	}
	
	public Color getDefaultColor() {
		return defaultColor;
	}
	public void setDefaultColor(Color defaultColor) {
		this.defaultColor = defaultColor;
		this.currentColor = this.defaultColor;
	}

	public Color getCurrentColor() {
		return currentColor;
	}
	public void setCurrentColor(Color currentColor) {
		this.currentColor = currentColor;
	}

	public double getCost() {
		return cost;
	}

	public void setCost(double cost) {
		this.cost = cost;
	}

	public int getX() {
		return x;
	}

	public int getY() {
		return y;
	}

	public PointType getType() {
		return type;
	}

	public void setType(PointType type) {
		this.type = type;
		setDefaultColor(type.color);
		setCost(type.cost);
	}
	
	public void resetColor(){
		this.currentColor = this.defaultColor;
	}

}
